#ifndef USERLISTWIDGET_H
#define USERLISTWIDGET_H

#include <QListWidget>

class UserListWidget : public QListWidget
{
    Q_OBJECT
public:
    UserListWidget(QWidget *parent = nullptr) : QListWidget(parent) {
        QObject::connect(this, &UserListWidget::itemDoubleClicked, this, &UserListWidget::onItemDoubleClicked);
    }

public slots:

    void onItemDoubleClicked(QListWidgetItem* item);

protected:

    void mousePressEvent(QMouseEvent *event) override;



signals:
    void chat(QString account, bool show, bool isUser);

    void eraseFriend(QString account);

};

#endif // USERLISTWIDGET_H
